<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ include file="header.jsp" %>
    <h1>用户登录</h1>
    <form action="${pageContext.request.contextPath}/user/login" method="post" style="max-width: 400px; margin: 30px auto;">
        <div style="margin-bottom: 15px;">
            <label for="username">用户名:</label>
            <input type="text" id="username" name="username" required style="width: 100%; padding: 8px; margin-top: 5px;">
        </div>
        <div style="margin-bottom: 15px;">
            <label for="password">密码:</label>
            <input type="password" id="password" name="password" required style="width: 100%; padding: 8px; margin-top: 5px;">
        </div>
        <button type="submit" class="btn">登录</button>
        <p style="margin-top: 15px;">
            还没有账号? <a href="${pageContext.request.contextPath}/register.jsp">立即注册</a>
        </p>
        <c:if test="${not empty error}">
            <p class="error">${error}</p>
        </c:if>
    </form>
<%@ include file="footer.jsp" %>